<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\MaterialAsset;
MaterialAsset::register($this);  
$this->title = '素材列表 -- Sacrebleu DSP';
?>
<div class="col-sm-6">
  <ol class="breadcrumb">
   	<li>运营管理</li>
    <li>素材管理</li>
    <li class="active">数据</li>
  </ol>
</div>
</div>
<div id="main-container">
  <div class="row">
  	<h3 class="page-title">
      <i class="fa fa-image"></i>
      素材管理
      <small>数据列表</small>
    </h3>
  </div>
  <div class="panel">
    <div class="panel-heading">
      <div class="pull-right">
        <a href="<?php echo Url::to(['material/new-material']); ?>" class="btn btn-success" id="new-operate-btn">
          <i class="fa fa-upload"></i>
          上传素材
        </a>
      </div>
    </div>
      <div class="panel-body">
      	<div class="row">
      		<div class="col-sm-12">
      			<div class="table-responsive">
      				<table class="table table-hover" id="data-table">
              <thead>
                <tr>
                  <th>ID</th>
                  <th>素材名称</th>
                  <th>类型</th>
                  <th>尺寸</th>
                  <th>所属用户角</th>
                  <th>状态</th>
                  <th>最后修改时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>223238</td>
                  <td>material-01</td>
                  <td>图片</td>
                  <td>300*250</td>
                  <td>Lancester</td>
                  <td>正常</td>
                  <td>2014/12/11 12:34:46</td>
                  <td>
                  	<div class="tab-btn-group">
                  		<button class="btn btn-primary btn-xs"><i class="fa fa-edit"></i></button>
                  	</div>
                  </td>
                </tr>
                <tr>
                  <td>223238</td>
                  <td>material-01</td>
                  <td>Flash</td>
                  <td>300*250</td>
                  <td>Lancester</td>
                  <td>正常</td>
                  <td>2014/12/11 12:34:46</td>
                  <td>
                    <div class="tab-btn-group">
                      <button class="btn btn-primary btn-xs"><i class="fa fa-edit"></i></button>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
      			</div>
      		</div>
      	</div>
      </div>
  </div>
</div>
<div id="extra-container"></div>
<?php
  //$dataUrl = Yii::getAlias('@web').'/response/material/materialDataList.php';
  $dataUrl = Url::to(['get-all-materials']);
  $this->registerJs("SL.setVar('MATERIAL_DATA_LIST','$dataUrl');", View::POS_END);
  $this->registerJsFile('@web/js/material/sl.materialList.js', ['depends' => 'app\assets\MaterialAsset']);
?>